package com.sparsearr.datastructures.itheima.copyarr;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/4/19 16:32
 * @Description: 复制数组
 * @Version: 1.0
 */

public class CopyArr {
    private static final Logger logger = LogManager.getLogger(CopyArr.class);

    public static void main(String[] args) {
        int[]  arr = {1,2,3,4,5};
        int[] newArr = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
//            logger.info("arr[i] = {}", arr[i]);
            newArr[i] = arr[i];
        }
        for (int i = 0; i < newArr.length; i++) {
            logger.info("newArr[i] = {}", newArr[i]);
        }
    }
}
